package com.ourteam.system.domain;

import net.dao.IDataPopulateCallback;

import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

import java.util.HashMap;

/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Thu Jul 12 16:34:06 CST 2018
 * Auto Generate Date : 2018-07-20 12:05:00
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import java.util.Map;


public class SystemEventLogTypeBean implements java.io.Serializable {
    private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

    static {
        mappedDaoFields.put("id", com.ourteam.system.dao.ISysEventLogTypeDAO.Id);

        mappedDaoFields.put("eventTypeCode",
            com.ourteam.system.dao.ISysEventLogTypeDAO.EventTypeCode);

        mappedDaoFields.put("eventTypeName",
            com.ourteam.system.dao.ISysEventLogTypeDAO.EventTypeName);

        mappedDaoFields.put("status",
            com.ourteam.system.dao.ISysEventLogTypeDAO.Status);

        mappedDaoFields.put("remarks",
            com.ourteam.system.dao.ISysEventLogTypeDAO.Remarks);

        mappedDaoFields.put("eventContentTemplate",
            com.ourteam.system.dao.ISysEventLogTypeDAO.EventContentTemplate);

        mappedDaoFields.put("eventDomainId",
            com.ourteam.system.dao.ISysEventLogTypeDAO.EventDomainId);

        mappedDaoFields.put("eventDomainName",
            com.ourteam.system.dao.ISysEventLogTypeDAO.EventDomainName);
    }

    private com.ourteam.system.dao.SysEventLogType sysEventLogType;

    public SystemEventLogTypeBean() {
        super();

        this.sysEventLogType = new com.ourteam.system.dao.SysEventLogType();
    }

    public SystemEventLogTypeBean(
        com.ourteam.system.dao.SysEventLogType sysEventLogType) {
        super();

        this.sysEventLogType = sysEventLogType;
    }

    protected BeanMap getBeanMap() {
        return new BeanMap(sysEventLogType);
    }

    public static String getMappedDAOField(String aAttrName) {
        return mappedDaoFields.get(aAttrName);
    }

    public com.ourteam.system.dao.SysEventLogType convertToSysEventLogType() {
        return this.sysEventLogType;
    }

    public com.ourteam.system.dao.SysEventLogType convertTo() {
        return this.sysEventLogType;
    }

    /**
     * Get id
     *
     * @return long
     */
    public long getId() {
        return (long) this.sysEventLogType.getId();
    }

    /**
     * Set id
     *
     * @parameter long
     */
    public void setId(long id) {
        this.sysEventLogType.setId(id);
    }

    /**
     * Get eventTypeCode
     *
     * @return String
     */
    public String getEventTypeCode() {
        return (String) this.sysEventLogType.getEventTypeCode();
    }

    /**
     * Set eventTypeCode
     *
     * @parameter String
     */
    public void setEventTypeCode(String eventTypeCode) {
        this.sysEventLogType.setEventTypeCode(eventTypeCode);
    }

    /**
     * Get eventTypeName
     *
     * @return String
     */
    public String getEventTypeName() {
        return (String) this.sysEventLogType.getEventTypeName();
    }

    /**
     * Set eventTypeName
     *
     * @parameter String
     */
    public void setEventTypeName(String eventTypeName) {
        this.sysEventLogType.setEventTypeName(eventTypeName);
    }

    /**
     * Get status
     *
     * @return String
     */
    public String getStatus() {
        return (String) this.sysEventLogType.getStatus();
    }

    /**
     * Set status
     *
     * @parameter String
     */
    public void setStatus(String status) {
        this.sysEventLogType.setStatus(status);
    }

    /**
     * Get remarks
     *
     * @return String
     */
    public String getRemarks() {
        return (String) this.sysEventLogType.getRemarks();
    }

    /**
     * Set remarks
     *
     * @parameter String
     */
    public void setRemarks(String remarks) {
        this.sysEventLogType.setRemarks(remarks);
    }

    /**
     * Get eventContentTemplate
     *
     * @return String
     */
    public String getEventContentTemplate() {
        return (String) this.sysEventLogType.getEventContentTemplate();
    }

    /**
     * Set eventContentTemplate
     *
     * @parameter String
     */
    public void setEventContentTemplate(String eventContentTemplate) {
        this.sysEventLogType.setEventContentTemplate(eventContentTemplate);
    }

    /**
     * Get eventDomainId
     *
     * @return long
     */
    public long getEventDomainId() {
        return (long) this.sysEventLogType.getEventDomainId();
    }

    /**
     * Set eventDomainId
     *
     * @parameter long
     */
    public void setEventDomainId(long eventDomainId) {
        this.sysEventLogType.setEventDomainId(eventDomainId);
    }

    /**
     * Get eventDomainName
     *
     * @return String
     */
    public String getEventDomainName() {
        return (String) this.sysEventLogType.getEventDomainName();
    }

    public int hashCode() {
        return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof SystemEventLogTypeBean) == false) {
            return false;
        } // end if

        SystemEventLogTypeBean other = (SystemEventLogTypeBean) obj;

        boolean isEqual = false;

        com.ourteam.system.dao.SysEventLogType tempSysEventLogType = other.convertToSysEventLogType();

        if ((tempSysEventLogType == null) || (this.sysEventLogType == null)) {
            isEqual = false;
        } else if ((tempSysEventLogType == this.sysEventLogType) ||
                tempSysEventLogType.equals(this.sysEventLogType)) {
            isEqual = true;
        } else {
            isEqual = false;
        }

        return isEqual;
    }

    public static SystemEventLogTypeBean[] toArray(
        com.ourteam.system.dao.SysEventLogType[] aSysEventLogTypes) {
        return toArray(aSysEventLogTypes, null);
    }

    public static SystemEventLogTypeBean[] toArray(
        com.ourteam.system.dao.SysEventLogType[] aSysEventLogTypes,
        IDataPopulateCallback aCallBack) {
        if (ArrayUtils.isEmpty(aSysEventLogTypes)) {
            return new SystemEventLogTypeBean[0];
        }

        int length = aSysEventLogTypes.length;

        SystemEventLogTypeBean[] beans = new SystemEventLogTypeBean[length];

        for (int i = 0; i < length; i++) {
            beans[i] = new SystemEventLogTypeBean(aSysEventLogTypes[i]);

            if (aCallBack != null) {
                aCallBack.populate(beans[i],
                    new Object[] { aSysEventLogTypes[i] });
            }
        }

        return beans;
    }
}
